<template>
  <div class="z-crumb__wrapper flex items-center justify-center">
    <div :class="['z-crumb','flex','items-center','justify-center',{
   'z-crumb--expend':expand
  }]"
         v-bind="$attrs"
         v-on="$listeners">

      <div class="cuifont icon_crumbs"
           :class="expand?'transform180':'transform0'"></div>

    </div>
  </div>

</template>

<script>
export default {
  name: 'Crumb',
  props: {
    expand: {
      type: Boolean,
      default: true
    }
  }
}
</script>

<style lang="scss" scoped>
.z-crumb__wrapper {
  height: 40px;
  padding: 0 16px;
  flex-shrink: 0;
  flex-grow: 0;
}
.z-crumb {
  width: 24px;
  height: 24px;
  color: #7f7f7fff;
  cursor: pointer;
  background-image: url("#{$--ossLink}/app/view_pageheader/crumbs.png");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
  &:hover {
    background: #fff;
    .icon_crumbs {
      background-image: url("#{$--ossLink}/app/view_pageheader/show_aside.png");
      background-size: 12px;
      background-position: center;
      background-repeat: no-repeat;
    }
  }
  .icon_crumbs {
    width: 12px;
    height: 12px;
  }
}

.transform0 {
  transform: rotate(0deg);
}
.transform180 {
  transform: rotate(180deg);
}
</style>
